package ru.spbau.goncharova.chat.test;

import ru.spbau.goncharova.chat.client.Client;

import java.net.InetSocketAddress;

public class Main {
    public static void main(String[] args) {
        String serverAddress = args[0];
        int port = Integer.parseInt(args[1]);
//        Client client = new Client(InetSocketAddress.createUnresolved(serverAddress, port), "testClient");
        Client client = new Client(new InetSocketAddress(serverAddress, port), "testClient");

        client.connect();
        client.send("One, two, three...");
        client.send("asdasdasd");
        client.send("hhghghg");
        try {
            Thread.sleep(1000000);
        } catch (InterruptedException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        }
        client.disconnect();
    }
}
